<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'index.jsp' starting page</title>
    <base href="<%=basePath%>">
    <style type="text/css">
<!--
* {
padding:0;
margin:0;
}
#upcontent {
list-style-position: outside;
list-style-image: none;
list-style-type: none;
}
#upcontent li {
font-size:12px;
color:#333;
line-height:150%;
}
#bodyL {
float:left;
width:84px;
margin-right:2px;
}
#tittleup {
font-size:14px;
font-weight:bold;
color:#000066;
padding-left:25px;
padding-top:25px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #d0daec;
margin-bottom: 10px;
padding-bottom: 10px;
}
a.od {
float:right;
font-size:14px;
color: #CC0000;
text-decoration: none;
}
a.od:hover {
color:#FF0000;
}
#fd {
background:#EDF1F8;
border: 2px solid #849BCA;
margin-top:2px;
margin-left:2px;
float:left;
overflow:hidden;
position:absolute;
left:380px;
top:200px;
cursor:move;
float:left;/*filter:alpha(opacity=50);*/
z-index: 10;
}
.contentup
{
padding:10px;
}
}
-->
</style>
  <link rel="stylesheet" href="<%=basePath%>css/common.css" type="text/css"></link>
  <script type="text/javascript" src="<%=basePath%>js/jquery-1.4.4.min.js"></script>
  <script type="text/javascript" src="<%=basePath%>js/homePage.js"></script>
  <script type="text/javascript" src="<%=basePath%>js/div_dialog.js"></script>
  </head>
  
  <body>
  	<div align="center">
  	<jsp:include page="/header.jsp" flush="true" /> 
  	</div>
  	<div align="center" style="border:1px #000 solid; margin-top: 10px;width: 800px;">
  	
    <form id="initForm" name="initForm" method="post">
    
    <!-- 显示最近注册的用户 -->
   		<span>根据动物园门卫王大爷的统计，自公测以来已有
   		<a href="javascript:void(0);"> <s:property value="#request.totalUser"/> </a>
   		 位同学发表了
   		 <a href="javascript:void(0);"> <s:property value="#request.totalForum"/> </a>
   		  条帖子</span>
   		  <hr/>
   		  
   		<!-- 最近注册的用户 -->
    	<div>
    	<s:iterator  var="userList" value="#request.userList"  status="statu">
    	<!-- 
			嘻嘻：<s:property value="#userList.userId"/>
    	 -->
    	<img alt="" src="<%=basePath%>css/img/photo.png" width="50px;" height="50px;">
		</s:iterator>
    	</div>
    	<hr/>
    	<!-- 图片显示 -->
    	<div style="margin-top: 10px;">
    		<s:iterator  var="forumList" value="#request.forumList"  status="statu">
    		<s:if test="%{#statu.odd}">
	    		<div class="div_left">
	    			<table width= "370px;" height="200px;" class="table_img">
						<tr height="70px;">
						   <td width="70px;">
								<div style="margin-left: 5px;">
				    				<img alt="" src="<%=basePath%>css/img/photo.png" width="60px;" height="60px;" >
				    			</div>
						   </td>  
						   <td width="150px;" align="left">
							   <div >
									花花的主人
									<font color="red"><s:property value="#forumList.userName" /></font>
									怒吼道：
								</div>
						   </td> 
						   <td  rowspan="2">
							   <div  style="width: 150px; height: 200px;">
				    				<img alt="" src="http://localhost:8080/petNet<s:property value='#forumList.imgPath' />" style="width: 150px; height: 200px;">
				    		   </div>
						   </td> 
						</tr>
						<tr>
						   <td colspan="2">
						   		<a  style="margin-left: 5px;" href="<%=basePath%>web/forumAction_detail.action?forumBean.topicId=<s:property value='#forumList.topicId'/>">
						   			<s:property value="#forumList.title" />
						   		</a>
						   </td>  
						</tr>
						</table>
	    		</div>
			</s:if>
			<s:else>
				<div class="div_right">
				<!-- 两行三列 -->
				<table width= "370px;" height="200px;" class="table_img">
						<tr height="70px;">
						   <td width="70px;">
								<div style="margin-left: 5px;">
				    				<img alt="" src="<%=basePath%>css/img/photo.png" width="60px;" height="60px;" >
				    			</div>
						   </td>  
						   <td width="150px;">
							   <div align="center">
									花花的主人
									<font color="red"><s:property value="#userList.userId" /></font>
									怒吼道：
								</div>
						   </td>  
						   <td  rowspan="2">
							   <div style="width: 150px; height: 200px;">
				    				<img alt="" src="<%=basePath%>css/img/jiayue.png" style="width: 150px; height: 200px;">
				    		   </div>
						   </td> 
						</tr>
						<tr>
						   <td colspan="2">
						   		<a  style="margin-left: 5px;" href="javaScript:void(0);" onclick="queryDetail('<s:property value="#forumList.topicId" />');">
						   			<s:property value="#forumList.title" />
						   		</a>
						   </td>  
						</tr>
						</table>
				</div>
			</s:else>
		</s:iterator>
    	</div>
    </form>
  	</div>
  	
  	<div align="center" style="margin-top: 10px;">
    <jsp:include page="/footer.jsp" flush="true" />
    </div>
  </body>
</html>
